//
//  SuDetailFirstTableViewCell.m
//  Delicious
//
//  Created by lanou on 16/5/9.
//  Copyright © 2016年 gy. All rights reserved.
//

#import "SuDetailFirstTableViewCell.h"

@implementation SuDetailFirstTableViewCell

- (void)awakeFromNib {
    // Initialization code
}

- (void)setModel:(SuFirst *)model{
    _model = model;
    [self.imageVIEW sd_setImageWithURL:[NSURL URLWithString:model.referrer[@"profileImageUrl"]]];
    self.nameLabel.text = model.referrer[@"nickname"];
    self.introduceLabel.text = _model.Description;
    self.easyOrDiffcult.text = _model.difficulty;
    self.timeLabel.text = _model.times;
    self.tastLabel.text = _model.taste;

}
- (CGFloat)heightForText:(NSString *)string
{
    NSDictionary *dic = @{NSFontAttributeName : [UIFont systemFontOfSize:14]};
    CGRect rect = [string boundingRectWithSize:CGSizeMake(self.introduceLabel.frame.size.width, 100000) options:NSStringDrawingUsesLineFragmentOrigin attributes:dic context:nil];
    return rect.size.height;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
